package com.netease.web.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import com.netease.web.pojo.Trx;

@Repository
public interface TrxDao {

	@Insert("insert into trx values(contentId=#{contentId},personId=#{personId},price=#{price},time=#{time})")
	public int insertTrx(int contentId, int personId, long price, long time);
	
	@Select("select * from trx where contentId=#{contentId}")
	public Trx selectTrxByContentId(int contentId);
	
	@Select("select * from trx where personId=#{personId}")
	public List<Trx> selectTrxesByPersonId(int personId);
}
